<?php
function smarty_function_html_breadcrumb($rP, &$smarty)
{
	if (!is_array($rP['from'])) { return ''; }
	$rLinks = array();
	foreach ($rP['from'] as $rLink) {
		/// href ///
		if (isset($rLink['link'])) {
			$sHref = $rLink['link'];
		}
		else {
			$sHref = 'javascript:void(0);';
		}
		/// class ///
		$sClass = isset($rP['class']) ? ' class="'.$rP['class'].'"' : '';
		/// html ///
		$rLinks[] = '<a href="'.$sHref.'" title="'.htmlspecialchars($rLink['title']).'"'.$sClass.'>'.htmlspecialchars($rLink['title']).'</a>';
	}
	$sGap = isset($rP['gap']) ? $rP['gap'] : ' &gt; ';
	return implode($sGap, $rLinks);
}
?>
